package com.cuit.blogsystem.mapper;

import com.cuit.blogsystem.entity.Type;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TypeMapper {

    /**
     * 添加类型
     */
    @Insert("insert into type (type_name) values (#{type})")
    void addType(String type);

    /**
     * 查询类型
     */
    @Select("select * from type where type_name = #{type}")
    Type findByType(String type);
}
